package com.dstz.bpm.api.constant;

public enum TaskStatus {
   NORMAL("NORMAL", "普通", "普通订单"),
   SUSPEND("SUSPEND", "挂起", "超管挂起任务"),
   LOCK("LOCK", "锁定", "个人将任务锁定至个人名下"),
   TURN("TURN", "转办", "个人将任务转办给其他人"),
   AGENCY("AGENCY", "代理", "代理其他人的任务"),
   BACK("BACK", "驳回", "被驳回的任务"),
   DESIGNATE("DESIGNATE", "指派", "个人将任务指派到某个人名下"),
   DRAG("DRAG", "捞单", "从捞单池中获取的订单");

   private String key = "";
   private String value = "";
   private String desc = "";

   private TaskStatus(String key, String value, String desc) {
      this.key = key;
      this.value = value;
   }

   public String getKey() {
      return this.key;
   }

   public void setKey(String key) {
      this.key = key;
   }

   public String getValue() {
      return this.value;
   }

   public void setValue(String value) {
      this.value = value;
   }

   public String toString() {
      return this.key;
   }

   public static TaskStatus fromKey(String key) {
      TaskStatus[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         TaskStatus c = var1[var3];
         if (c.getKey().equalsIgnoreCase(key)) {
            return c;
         }
      }

      throw new IllegalArgumentException(key);
   }

   public String getDesc() {
      return this.desc;
   }

   public void setDesc(String desc) {
      this.desc = desc;
   }
}
